package Application.Controller;

import Application.Tool.Eraser;
import javafx.fxml.FXML;
import javafx.scene.control.Slider;
import javafx.scene.control.ComboBox;

public class EraserSettingsController {
    @FXML private Slider eraserSettingsSize;
    @FXML private ComboBox<String> eraserSettingsMask;
    @FXML private Slider eraserSettingOpacity;

    @FXML public void onSizeChanged(){
        Eraser.getInstance().setSize((int)eraserSettingsSize.getValue());
    }

    @FXML public void onMaskChanged(){
        String maskName = eraserSettingsMask.getValue();

        Eraser.getInstance().setMask(maskName);
    }

    @FXML public void onOpacityChanged() {
        int opacity = (int)eraserSettingOpacity.getValue();
        Eraser.getInstance().setOpacity(opacity);
    }

    public ComboBox<String> getCombo() {
        return eraserSettingsMask;
    }
}
